package com.yssw.account.service.impl;

import java.math.BigDecimal;
import java.util.List;

import com.yssw.account.domain.AccountTable;
import com.yssw.account.domain.AccountTypeEnums;
import com.yssw.account.mapper.AccountTableMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yssw.account.mapper.AccountHeadMapper;
import com.yssw.account.domain.AccountHead;
import com.yssw.account.service.IAccountHeadService;

/**
 * 财务主Service业务层处理
 *
 * @author yssw
 * @date 2023-04-04
 */
@Service
public class AccountHeadServiceImpl implements IAccountHeadService {
    @Autowired
    private AccountHeadMapper accountHeadMapper;


    /**
     * 查询财务主
     *
     * @param id 财务主主键
     * @return 财务主
     */
    @Override
    public AccountHead selectAccountHeadById(Long id) {

        return accountHeadMapper.selectAccountHeadById(id);
    }

    /**
     * 查询财务主列表
     *
     * @param accountHead 财务主
     * @return 财务主
     */
    @Override
    public List<AccountHead> selectAccountHeadList(AccountHead accountHead) {
        return accountHeadMapper.selectAccountHeadList(accountHead);
    }

    /**
     * 新增财务主
     *
     * @param accountHead 财务主
     * @return 结果
     */
    @Override
    public int insertAccountHead(AccountHead accountHead) {
        return accountHeadMapper.insertAccountHead(accountHead);
    }

    /**
     * 修改财务主
     *
     * @param accountHead 财务主
     * @return 结果
     */
    @Override
    public int updateAccountHead(AccountHead accountHead) {
        return accountHeadMapper.updateAccountHead(accountHead);
    }

    /**
     * 批量删除财务主
     *
     * @param ids 需要删除的财务主主键
     * @return 结果
     */
    @Override
    public int deleteAccountHeadByIds(Long[] ids) {

        return accountHeadMapper.deleteAccountHeadByIds(ids);
    }

    /**
     * 删除财务主信息
     *
     * @param id 财务主主键
     * @return 结果
     */
    @Override
    public int deleteAccountHeadById(Long id) {
        return accountHeadMapper.deleteAccountHeadById(id);
    }



}
